package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.OrderSetting;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface OrderSettingMapper extends BaseMapper<OrderSetting> {
    @Update("update ordersetting_t set reservations = reservations + 1 where order_date = #{orderDate}")
    void reduceReservations(@Param("orderDate") String orderDate);


    @Delete("delete from ordersetting_t where order_date < #{date}")
    void cleanTable(@Param("date") String formatDate);
}
